package com.itheima.exerciseTest.test40_49;

import java.io.File;
import java.io.IOException;

public class Test42 {
    public static void main(String[] args) throws IOException {
        // 创建目录
        File file1 = new File("backBurner\\aaaa");
        boolean boo1 = file1.mkdirs();
        System.out.println("创建目录 " + boo1);

        // 创建文件
        File file2 = new File("backBurner\\aaaa\\aaaa.txt");
        boolean boo2 = file2.createNewFile();
        System.out.println("创建文件 " + boo2);

        //删除文件
        boolean boo4 = file2.delete();
        System.out.println("文件删除 " + boo4);

        // 删除目录
        boolean boo3 = file1.delete();
        System.out.println("目录删除 " + boo3);

    }
}
